using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Evaluant.Uss;

namespace TestUSS
{
	[TestClass]
	public class TestRemotingPersistenceEngine : Common
	{
        System.Diagnostics.Process _Server;
        string _OldDir;

        protected override void CreatePersistenceEngine()
        {
            _OldDir = Directory.GetCurrentDirectory();

            FileInfo fi = new FileInfo(@"..\..\..\..\Evaluant.Uss.RemotingConsoleHost\bin\Debug\RemotingConsoleHost.exe");
            Directory.SetCurrentDirectory(fi.DirectoryName);

            _Server = System.Diagnostics.Process.Start(fi.FullName);

            // Wait the console application to initialize.
            System.Threading.Thread.Sleep(1000);
			
			Directory.SetCurrentDirectory(_OldDir);

            pef = XmlConfigLoader.LoadXmlConfig("engines.config", "Remoting");
        }

        [TestCleanup]
        public void ShutDown()
        {
            _Server.Kill();
        }

        [TestMethod]
        public void TestLaunch()
        {
            base.Ids();
        }

		[TestMethod]
		public override void Composition()
		{
			base.Composition();
		}

		[TestMethod]
		public override void Inheritance()
		{
			base.Inheritance();
		}
	}
}
